package com.zzusedating.androidapp;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.zzusedating.androidapp.customlayout.TextViewWithRightText;
import com.zzusedating.androidapp.tools.ActivityCollector;
import com.zzusedating.androidapp.tools.MyApplication;

public class SettingActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting_layout);

        TextViewWithRightText exit;
        TextViewWithRightText exitLogin;
        TextViewWithRightText about;
        exit = findViewById(R.id.exit);
        exitLogin = findViewById(R.id.exit_login);
        about = findViewById(R.id.about);

        exit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ActivityCollector.finishAll();
            }
        });

        exitLogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                int sz = ActivityCollector.size();
                startActivity(new Intent(SettingActivity.this, LoginActivity.class));
                ActivityCollector.finishFromStart(sz);
            }
        });
        about.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                MyApplication.Toast("猪在看这个吐司٩(๑❛ᴗ❛๑)۶");
            }
        });
    }
}
